Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Discover] Add Copy to clipboard ability for column name of Document Explorer #123892

Merged
merged 12 commits into from
Feb 28, 2022

Conversation

dimaanj
Copy link
Contributor

@dimaanj dimaanj commented Jan 27, 2022

Summary

Closes #103657

This PR adds Copy to clipboard column action.

BA46C6E1-2615-4ADD-84F0-41EE9339E4FA_4_5005_c

Checklist

Delete any items that are not applicable to this PR.

@dimaanj dimaanj added Feature:Discover Discover Application release_note:feature Makes this part of the condensed release notes v8.1.0 Team:DataDiscovery Discover App Team (Document Explorer, Saved Search, Surrounding documents, Data, DataViews) labels Jan 27, 2022
@dimaanj dimaanj self-assigned this Jan 27, 2022
@dimaanj
Copy link
Contributor Author

dimaanj commented Jan 27, 2022

@elasticmachine merge upstream

@dimaanj dimaanj marked this pull request as ready for review January 27, 2022 20:26
@dimaanj dimaanj requested a review from a team as a code owner January 27, 2022 20:26
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-data-discovery (Team:DataDiscovery)

@dimaanj dimaanj changed the title [Discover] Add copy column name to clipboard ability to Document Explorer [Discover] Add Copy to clipboard ability for column name of Document Explorer Jan 27, 2022
@dimaanj
Copy link
Contributor Author

dimaanj commented Jan 31, 2022

@elasticmachine merge upstream

@dimaanj
Copy link
Contributor Author

dimaanj commented Feb 21, 2022

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

expected head sha didn’t match current head ref.

@kertal
Copy link
Member

kertal commented Feb 24, 2022

@elasticmachine merge upstream

@kertal
Copy link
Member

kertal commented Feb 28, 2022

@elasticmachine merge upstream

Copy link
Member

@kertal kertal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, tested in cloud with Safari, Firefox, Chrome, works as expected 👍 could you add a unit test for copy_column_name_button.tsx, testing the triggering the function works? many thx!

Copy link
Member

@kertal kertal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unit test LGTM 👍 thx, didn't test again. Thx for this useful addon!

@kertal
Copy link
Member

kertal commented Feb 28, 2022

Can be merged once CI is green

@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
discover 428 429 +1

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
discover 377.4KB 377.7KB +276.0B

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @dmitriynj

@kertal kertal added v8.2.0 backport:skip This commit does not require backporting and removed v8.1.0 labels Feb 28, 2022
@dimaanj dimaanj merged commit fcfac8c into elastic:main Feb 28, 2022
lucasfcosta pushed a commit to lucasfcosta/kibana that referenced this pull request Mar 2, 2022
…t Explorer (elastic#123892)

* [Discover] copy column name to clipboard

* [Discover] add ability to use it for http

* [Discover] remove redundant span

* [Discover] update unit tests

* Update src/plugins/discover/public/components/discover_grid/copy_column_name_button.tsx

Co-authored-by: Matthias Wilhelm <ankertal@gmail.com>

* [Discover] import copyToClipboard util function from elastic ui

* [Discover] add unit tests

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Matthias Wilhelm <ankertal@gmail.com>
@VijayDoshi
Copy link

When I used this feature I expected this would copy the values of the column and the column name vs. just the column name.

@kertal
Copy link
Member

kertal commented Mar 9, 2022

So maybe we should describe it in a better way. And provide more functionality.
The original request was for the fieldname.
Copy name to clipboard
Copy values to clipboard (what format would you expect)

@VijayDoshi
Copy link

We could drop "to clipboard" Copy name & Copy column. I'd expect Column to include the header too so when I paste it into my spreadsheet I get the appropriate name too.

@kertal
Copy link
Member

kertal commented Mar 9, 2022

Love that idea, would be a simple change , and a little very helpful feature

@tylersmalley tylersmalley added ci:cloud-deploy Create or update a Cloud deployment and removed ci:deploy-cloud labels Aug 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting ci:cloud-deploy Create or update a Cloud deployment Feature:Discover Discover Application release_note:feature Makes this part of the condensed release notes Team:DataDiscovery Discover App Team (Document Explorer, Saved Search, Surrounding documents, Data, DataViews) v8.2.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add a 'copy to clipboard' option to the column menu in the new Table view
7 participants